﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MethodWorx.CMS.TemplateParser.Installer
{
    public class WizardPrompt
    {
        public string Variable { get; set; }
        public string Prompt { get; set; }
        public string Value { get; set;}
        public Dictionary<string, string> Parameters { get; set;}
        public string Type { get; set; }

        public void AddParametersFromTemplateElement(TemplateElement ask)
        {
            this.Parameters = new Dictionary<string, string>();
            foreach(var attr in ask.Children.OfType<TemplateAttribute>())
            {
                this.Parameters.Add(attr.Name, attr.Value);
            }
        }
    }
}
